<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>公示公告-衡阳房产_衡阳房地产_房地产信息网</title>
    <meta name="keywords" content="公示公告,衡阳房地产,衡阳房产,衡阳房产网,衡阳房价,衡阳二手房,衡阳房地产门户">
    <!--<link rel="stylesheet" type="text/css" href="layui/css/layui.css">-->
    <link rel="stylesheet" type="text/css" href="images/global.css">
    <script type="text/javascript" src="layui/jquery-1.9.1.js"></script>
    <!--<script src="layui/layui.js" charset="utf-8"></script>-->

    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
    <script src="https://www.layuicdn.com/layui/layui.js"></script>

    <script type="text/javascript" src="https://lib.baomitu.com/vue/2.6.12/vue.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.min.js"></script>
    <style>
        .layui-word-aux{
            color:red
        }
    </style>
</head>
<body>
<div class="bodymain">
    <div class="layui-header head_box">
        <div class="layui-container head_box_in">
            <div class="layui-row">
                <div class="layui-col-md3">
                    欢迎您登录衡阳房产交易服务网！<!--<a href="#">【登录】</a><a href="#">【注册】</a>-->
                </div>
                <div class="layui-col-md9" style="text-align:right"> <!----> <span class="head_menu"> <a href="/">首页</a><font>|</font><a
                        href="/bbs/">公示公告</a><font>|</font><a href="/realestate/">商品房中心</a><font>|</font><a
                        href="/news/">行业资讯</a><font>|</font><a
                        href="http://59.51.45.56:8088/jyyt/app/framework/login/index;JSESSIONID=9cadf813-76e0-4af9-9484-3261b8db76c6"
                        target="_blank">合同备案</a> </span> <!---->
                </div>
            </div>
        </div>
    </div> <!---->
    <div class="layui-main main-nav">
        <div class="logo">
            <img src="images/bg2.jpg">
        </div>
        <div class="imgslogo">
        </div>
        <div style="display:block; clear:both"></div>
        <div class="nav">
            <ul class="nav-box clear">
                <li id="top0" class="nav-item current"><a href="/" class="nav-item-primary">房产首页</a></li>
                <li class="nav-item"><a class="nav-item-primary" href="/bbs/">公示公告</a></li>
                <li class="nav-item"><a class="nav-item-primary" href="/realestate/">商品房中心</a></li>
                <li class="nav-item"><a class="nav-item-primary" href="http://59.51.45.154:8000/" target="_blank"
                                        title="物业行业信用评价系统">物业行业信用评价</a></li>
                <li class="nav-item"><a class="nav-item-primary" href="http://59.51.45.54:8000/GZFW/" target="_blank"
                                        title="物业维修基金">物业维修基金</a></li>
                <li class="nav-item"><a class="nav-item-primary" href="/news/">行业资讯</a></li>
                <li class="nav-item"><a class="nav-item-primary" href="/gov/" target="_blank">备案查询</a></li>
                <li class="nav-item"><a class="nav-item-primary" href="http://59.51.45.56:8088/jyyt/" target="_blank">网上服务大厅</a>
                </li>
            </ul>
        </div>
        <div style="height:10px"></div>
    </div>
    <link rel="stylesheet" type="text/css" href="bbs/images/css.css">
    <div class="layui-main">
        <div style="clear:both">
        </div>
        <div style="height:10px"></div>
    </div>

    <div class="layui-container" id="app">
        <div class="layui-row">
            <div class="layui-col-md12">
                <form class="layui-form" lay-filter="bbsform" action="">
                    <div class="layui-form-item">
                        <label class="layui-form-label">输入框</label>
                        <div class="layui-input-inline">
                            <input type="text" name="title" placeholder="请输入标题" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">{{msg.title}}</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">密码框</label>
                        <div class="layui-input-inline">
                            <input type="text" name="intime" placeholder="请输入时间" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid layui-word-aux">{{msg.intime}}</div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">类别</label>
                        <div class="layui-input-inline">
                            <select name="type" >
                                <option value=""></option>
                                <option value="0">测绘公示</option>
                                <option value="1">房产公示</option>
                                <option value="2">物业公示</option>
                                <option value="3">...</option>
                            </select>
                        </div>
                        <div class="layui-form-mid layui-word-aux">{{msg.type}}</div>
                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">公告内容</label>
                        <div class="layui-input-inline">
                            <textarea name="content" placeholder="请输入内容" class="layui-textarea" style="width: 300px"></textarea>
                        </div>
                        <div class="layui-form-mid layui-word-aux">{{msg.content}}</div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button @click.prevent="save" class="layui-btn" lay-filter="formDemo">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script>
        var v = new Vue({
            el : "#app",
            data : {
                msg:{title:"", content:"", intime:"", type:""}
            },
            methods : {
                save(){
                    // 与 vue 有冲突
                    var bbs = layui.form.val("bbsform");
                    var param = new URLSearchParams();
                    param.append("title",bbs.title);
                    param.append("typeId",bbs.type);
                    param.append("intime",bbs.intime);
                    param.append("content",bbs.content);
                    axios.post("bbs/save", param ).then(res=>{
                        // 清空之前提示
                        for(let field in this.msg ){
                            this.msg[field] = "";
                        }
                        // 设置新的提示
                        if(res.data.code==0){
                            for(let err of res.data.data){
                                this.msg[err.field] = err.defaultMessage;
                            }
                        } else {
                            alert(res.data.msg);
                        }
                    });
                }
            }
        })

    </script>

    <div class="footer">
        <div class="grid zbj-grid ui-footer-bd bordert">
            <p>Copyright (c) 2007 版权所有 衡阳市住房和城乡建设信息中心 联系电话：0734-8275632 8275629 </p>
            <p></p>
            <p><a href="http://beian.miit.gov.cn/" target="_blank">湘ICP备07007704号-1</a> All rights reserved,
                www.hyfc365.com E-mail:webmaster@hyfc365.com</p>
        </div>
    </div>
</div>
</body>
</html>